﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;

namespace FGrubert.CrmQueueMonitor.WinForms
{
    public class QueueConfig : QueueBase
    {
        private bool _selected;
        /// <summary>
        /// Gets or sets if the queue is selected
        /// </summary>
        public bool Selected
        {
            get { return _selected; }
            set { _selected = value; }
        }

        /// <summary>
        /// Returns the type of the queue based on the name (Business, Private or WIP)
        /// </summary>
        public QueueType QueueType
        {
            get
            {
                if (this.Name.StartsWith("<"))
                {
                    return QueueType.Private;
                }
                else if(this.Name.Contains("WIP bin"))
                {
                    return QueueType.WIP;
                }
                else
                {
                    return QueueType.Business;
                }
            }
        }
    }
}
